package conexionBD;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;


public class GestorBD {
	
	private static GestorBD instance = null;
	
	private Connection conn;
	
	public static GestorBD getInstance() {
		if (instance == null)
			instance = new GestorBD();
		return instance;
	}

	public void connect() throws ClassNotFoundException, SQLException {
		Class.forName("org.sqlite.JDBC");
		
		conn = DriverManager.getConnection("jdbc:sqlite:../bd/xabiAnder.sqlite");
	}
	
	public void disconnect() throws SQLException {
		conn.close();
	}
	
	}
